<include file="Public:header" />
<!--主体内容-->
<!--左边-->
<div class="centent_box">
    <include file="Public:left" />
    <!--右边-->
    <div class="centent_right_box">
        <div class="centent_right rightCon">
            <div class="Mtitle">
                <ul>
                    <li class="on"><span>发布文章</span></li>
                </ul>
                <div class="rightWord"><a href="{:U('Article/index')}">文章管理</a> &gt;&gt; 发布文章</div>
            </div>
            <form id="info_form" action="{:U('Article/edit')}" method="post" enctype="multipart/form-data">
            <input type="hidden" name="id" value="{$info.id}">
            <div class="con_div">
                <ul class="formList width2 list_ul">
                    <li>
                        <label>文章标题：</label>
                        <input type="text"  name="title" id="title" value="{$info.title}" class="inputStyle width3">
                    </li>
                    <li>
                        <label>所属分类：</label>
                        <select name="data[cate_id]" class="selectStyle">
                            <volist name="cate_list" id='vo'>
                                <option <php>if($vo['id']==$info['cate_id']){</php> selected="selected" <php>}</php> value="{$vo.id}">{$vo.html}{$vo.name}</option>
                            </volist>
                        </select>
                    </li>
                    <li>
                        <label>来源：</label>
                        <input type="text" class="inputStyle width2" value="{$info.comefrom}" name="data[comefrom]" maxlength="10">
                        <span class="tip">2-10个中文字符（可不填）</span>
                    </li>
                    <li style="height:100px;margin-bottom: 0px;" >
                        <label></label>
                        <php>if($info['img']){</php>
                        <a target="_blank" href="{$info.img}"><img src="{$info.img}" style="width: 100px;height: 80px;"></a>
                        <php>}</php>
                    </li>
                    <li><label>缩例图：</label><input type="file" name="img"></li>
                    <li class="height1"><label>摘要简介：</label><textarea class="textarea" name="data[desc]">{$info.desc}</textarea></li>
                    <li style="margin-bottom: 5px;"><label>详细内容：</label><label style="width: 400px;"><input type="checkbox" name="pic" value="1"> 使用内容第一张图片做为缩例图</label></li>
                    <li class="height2">
                        <textarea name="data[info]" id="info" style="width:850px;height:500px;resize: none;float:left">{$info.info}</textarea>
                    </li>
                    <li>
                        <label>当前状态：</label>
                        <span class="blue">{$status[$info['status']]}</span>
                    </li>
                    <li>
                        <label>发布状态：</label>
                        <select class="selectStyle" name="data[status]">
                            <option <php>if(1==$info['status']){</php> selected="selected" <php>}</php> value="1">发布文章</option>
                            <option <php>if(5==$info['status']){</php> selected="selected" <php>}</php> value="5">存为手稿</option>
                        </select>
                    </li>
                    <li>
                        <label></label>
                        <input type="submit" value="提 交" class="btnStyle">
                    </li>
                </ul>
            </div>
            </form>
        </div>
    </div>
</div>
<js file="__S__/ueditor/ueditor.config.js" charset="utf-8" />
<js file="__S__/ueditor/ueditor.all.min.js" charset="utf-8" />
<js file="__S__/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" />
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
    window.onload=function(){
        window.UEDITOR_CONFIG.initialFrameWidth=880;
        window.UEDITOR_CONFIG.initialFrameHeight=500;
    }
    var ue = UE.getEditor('info', {
        toolbars: [[
            'fullscreen', 'source', '|',
            'bold', 'italic', 'underline', '|', 'fontfamily','fontsize', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', 'simpleupload','|', 'kityformula', 'preview'
        ]]
    });
</script>
<script src="__S__/js/jquery.validate.js"></script>
<script type="text/javascript">
    $(function(){
        $("#info_form").validate({
            rules: {
                title: {
                    required: true,
                    minlength: 2
                }
            },
            messages: {
                title: {
                    required: "请输入文章标题",
                    minlength: "文章标题一定要两个字以上"
                }
            }
        });
    });
</script>
<include file="Public:footer" />